package com.gene.controller.item;

import com.gene.pojo.TbItemDesc;
import com.gene.service.ITbItemDescService;
import com.gene.utils.ResultData;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;


/**
 * 商品详情表
 */
@Controller
@RequestMapping("/gene-safe/tbItemDesc")
public class TbItemDescController {
    @Autowired
    private ITbItemDescService tbItemDescService;

    /**
     * 查询目录  通过itemId来查询
     * @return
     */
    @RequestMapping(value="/selectId")
    @ResponseBody
    public ResultData selectTtemId(TbItemDesc tbItemDesc){
        ResultData result=new ResultData();
        TbItemDesc t = tbItemDescService.selectId(tbItemDesc);
        if(null != t){
            result.setData(t);
            result.setStatus("1");
            result.setMsg("查询成功");
        }else{
            result.setStatus("0");
            result.setMsg("查询失败");
        }
        return result;
    }
}
